//
//  unittest4.c
//  Dominion
//
//  Eric Hook
//  hooke@onid.orst.edu
//  CS362 Winter 2014
//

#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "rngs.h"

int seed = 1000;
int k[10] = {adventurer, council_room, feast, gardens, mine, remodel, smithy, village, baron, great_hall};

void testInitializeGameVerifyExpectedResultIsNegativeOneWithMaxPlayersPlusOne() {
    int expectedResult=-1;
    int actualResult=0;
    struct gameState G;
    
    printf ("TESTING: initializeGame(int numPlayers, int kingdomCards[10], int randomSeed, struct gameState *state) : unittest4.c.\n");
    
    memset(&G, 23, sizeof(struct gameState));                       // clear the game state
    
    actualResult = initializeGame(MAX_PLAYERS + 1, k, seed, &G);    // initialize a new game
    
    assert(actualResult == expectedResult);                         // checks return error with one mare than max players
    
    printf ("!!! PASS: initializeGame(int numPlayers, int kingdomCards[10], int randomSeed, struct gameState *state) : unittest4.c.\n\n");
}

int main () {
    testInitializeGameVerifyExpectedResultIsNegativeOneWithMaxPlayersPlusOne();
    return 0;
}